import request from '@/utils/request'

// 查询入库列表
export function listPurchaseGoods(query) {
  return request({
    url: '/shop/purchaseGoods/list',
    method: 'get',
    params: query
  })
}

// 查询入库详细
export function getPurchaseGoods(id) {
  return request({
    url: '/shop/purchaseGoods/' + id,
    method: 'get'
  })
}

// 新增入库
export function addPurchaseGoods(data) {
  return request({
    url: '/shop/purchaseGoods',
    method: 'post',
    data: data
  })
}

// 修改入库
export function updatePurchaseGoods(data) {
  return request({
    url: '/shop/purchaseGoods',
    method: 'put',
    data: data
  })
}

// 删除入库
export function delPurchaseGoods(id) {
  return request({
    url: '/shop/purchaseGoods/' + id,
    method: 'delete'
  })
}

//根据id修改入库信息
export function updatePurchaseGoodsStatus(data){
  return request({
    url: '/shop/sellGoods/updateOrderPurchase',
    method:'put',
    data:data
  })
}

//根据入库状态筛选入库信息
export function getStatusGoods(data) {
  return request({
    url: '/shop/purchaseGoods/getStatusGoods',
    method: 'get',
    params:data
  })
}

//根据待确定入库状态筛选入库数量
export function getPurchaseNumConfirm(data){
  return request({
    url: '/shop/purchaseGoods/getPurchaseNumConfirm/'+data,
    method: 'get'
  })
}

